Repository navigation
Fix incorrect per-numa-cell allocation reporting - #106
Merged
Merged
Conversation
addAllocationCapacity keyed per-cell memory and CPU accounting by the domain's guest NUMA cell id (memnode cellid / cpu numa cell id), which is a per-VM virtual index and almost always 0 for single-vNUMA VMs. As a result, nearly all allocation was attributed to host cell 0 regardless of which host physical NUMA node the VMs were actually pinned to; only VMs spanning multiple vNUMA nodes showed multi-cell allocation. Key the accounting by the host physical NUMA node from the memnode nodeset instead, and resolve each guest CPU NUMA cell to its host node via the same guest-cell-to-host-node mapping so CPU and memory are attributed consistently. Add parseSingleNodeset to parse the nodeset and reject multi-node sets that cannot be attributed to a single cell. Co-authored-by: jeoff.zheng@sap.com <jeoff.zheng@sap.com> Signed-off-by: Philipp Matthes <p.matthes@sap.com>
Merging this branch will increase overall coverage
Coverage detailsCompared to commit fb5169a (run #41906518979)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files:
|
notandy
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hypervisor.status.cells reported per-NUMA-cell memory and CPU allocation keyed by each domain's guest NUMA cell id (the memnode cellid and cpu numa cell id), which is a per-VM virtual index that is almost always 0 for single-vNUMA VMs; this concentrated nearly all allocation on host cell 0 regardless of which host physical NUMA node the VMs were actually pinned to, and only VMs spanning multiple vNUMA nodes showed multi-cell allocation. This change keys the accounting by the host physical NUMA node taken from the memnode nodeset instead, resolves each guest CPU NUMA cell to its host node through the same guest-cell-to-host-node mapping so CPU and memory are attributed consistently, adds a parseSingleNodeset helper that rejects nodesets spanning more than one host node, and adds regression tests covering a single-vNUMA VM pinned to a non-zero host cell as well as a multi-cell VM whose guest cell ids differ from its host nodes.